package Test03;

import javax.swing.*;
import java.util.ArrayList;
import java.util.Collections;

public class SheepTest {
    public static void main(String[] args){
        JFrame frame = new JFrame();
        JPanel panel = new JPanel();
        panel.setLayout(null);
        frame.add(panel);

        JLabel background = new JLabel(new ImageIcon("res/背景.jpg"));
        background.setSize(480,800);
        panel.add(background);

        Sheep sheep = new Sheep();
        ArrayList<JButton> cardList = sheep.get(6);
        ArrayList<JButton> troughList = new ArrayList<>();
        Collections.shuffle(cardList);
        sheep.put(cardList,panel,0,7,7,30,60);
        sheep.put(cardList,panel,0 + 49,6,6,30 + 30,60 + 30);
        sheep.put(cardList,panel,0 + 49 + 36,5,7,30 + 30,60 + 30 + 30);
        sheep.put(cardList,panel,0 + 49 + 36 + 25,5,7,30 + 30 + 30,60 + 30 + 30);
        sheep.pressing(cardList);
        sheep.addAction(cardList,troughList,panel);




        frame.setSize(480,800);
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
}
